<?php

namespace App\Models\Admin;

use Illuminate\Database\Eloquent\Relations\Pivot;

class AdminPowerRole extends Pivot
{
    // 指示是否自动维护时间戳
    public $timestamps = false;
    // 标识 ID 是否自增
    public $incrementing = true;

    protected $table = 'admin_power_role';
    protected $primaryKey = 'pr_id';
    //fillable 属性指定哪些属性可以被集体赋值;Guarded则相反
    protected $guarded = [];

    public function power()
    {
        return $this->belongsTo('App\Models\Admin\AdminPower', 'power_id', 'power_id');
    }

}
